package com.ytjj.qmyx.users.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UsersBalanceRecord implements Serializable {
    /**
     * 主键
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * 用户id
     *
     * @mbg.generated
     */
    private Integer userId;

    /**
     * 用户原余额
     *
     * @mbg.generated
     */
    private BigDecimal originalBalance;

    /**
     * 用户新余额
     *
     * @mbg.generated
     */
    private BigDecimal newBalance;

    /**
     * 流水类型 add加 sub减
     *
     * @mbg.generated
     */
    private String type;

    /**
     * 金额
     *
     * @mbg.generated
     */
    private BigDecimal balance;

    /**
     * 金额来源
     *
     * @mbg.generated
     */
    private String source;

    /**
     * 金额类型 1可抵扣金额 2可提现金额
     *
     * @mbg.generated
     */
    private Byte amountType;

    /**
     * 金额来源号 订单号/提现单号
     *
     * @mbg.generated
     */
    private String code;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public BigDecimal getOriginalBalance() {
        return originalBalance;
    }

    public void setOriginalBalance(BigDecimal originalBalance) {
        this.originalBalance = originalBalance;
    }

    public BigDecimal getNewBalance() {
        return newBalance;
    }

    public void setNewBalance(BigDecimal newBalance) {
        this.newBalance = newBalance;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Byte getAmountType() {
        return amountType;
    }

    public void setAmountType(Byte amountType) {
        this.amountType = amountType;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", originalBalance=").append(originalBalance);
        sb.append(", newBalance=").append(newBalance);
        sb.append(", type=").append(type);
        sb.append(", balance=").append(balance);
        sb.append(", source=").append(source);
        sb.append(", amountType=").append(amountType);
        sb.append(", code=").append(code);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}